package com.study.demo.service;


import com.study.demo.course.SpecializedCourse;
import com.study.demo.course.SpecializedCourses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CourseService {
    @Autowired
    private SpecializedCourse specializedCourse;

    public SpecializedCourse getSpecializedCourse() {
        //原来的内容
        System.out.println(specializedCourse.toString());
        specializedCourse.setId(2);
        specializedCourse.setName("C++");
        specializedCourse.setContent("数据结构");
        //修改后的内容
        System.out.println(specializedCourse.toString());;
        return specializedCourse;
    }
}
